<%@ page contentType="text/html; charset=UTF-8"%>
<%@ page trimDirectiveWhitespaces="true"%>
<%@ taglib prefix="decorator" uri="http://www.opensymphony.com/sitemesh/decorator"%>
<%@ include file="/WEB-INF/jspf/taglibs.jspf"%>
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>海量通DSP服务平台</title>
		<!-- <link rel="stylesheet" href="/styles/newVersion/custom.css" type="text/css"> -->

	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<link rel="stylesheet" href="/styles/bootstrap.css" type="text/css">
	<link rel="stylesheet" href="/styles/main.css" type="text/css">
	<link rel="stylesheet" href="/styles/newVersion.css" type="text/css">
	<link rel="stylesheet" href="/styles/jquery.dataTables.css" type="text/css">

	<script src="/js/jquery.js"></script>
	<script type="text/javascript">
	//金钱格式化
	 function formatCurrency(num) {  
	       num = num.toString().replace(/\$|\,/g,'');  
	       if(isNaN(num))  
	           num = "0";  
	       sign = (num == (num = Math.abs(num)));  
	       num = Math.floor(num*100+0.50000000001);  
	       cents = num%100;  
	       num = Math.floor(num/100).toString();  
	       if(cents<10)  
	       cents = "0" + cents;  
	       for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)  
	       num = num.substring(0,num.length-(4*i+3))+','+  
	       num.substring(num.length-(4*i+3));  
	       return (((sign)?'':'-') + num + '.' + cents);  
	   } 
	</script>
	<script src="/js/underscore.js"></script>
	<script src="/js/backbone.js"></script>
	<script src="/js/jquery-ujs.js"></script>
	<script src="/js/jquery-ui.js"></script>
	<script src="/js/jquery.noty.packaged.js"></script>
	<script type="text/javascript" src="/js/bootstrap.js"></script>
	<script type="text/javascript" src="/js/jquery.validate.js"></script>
	<script type="text/javascript" src="/js/additional-methods.js"></script>
	<script type="text/javascript" src="/js/messages_zh.js"></script>
	<script type="text/javascript" src="/js/jquery-validate.bootstrap-tooltip.js"></script>
	<script type="text/javascript" src="/js/jquery.form.js"></script>
	<script type="text/javascript" src="/js/My97DatePicker/WdatePicker.js"></script>
	<script type="text/javascript" src="/js/echarts.min.js"></script>
	<script type="text/javascript" src="/js/macarons.js"></script>
	<script type="text/javascript" src="/js/bootbox.js"></script>
	<script type="text/javascript">
	_.templateSettings = {
		    evaluate    : /{{([\s\S]+?)}}/g,
		    interpolate : /{{=([\s\S]+?)}}/g,
		    escape      : /{{-([\s\S]+?)}}/g
		  };
        var wm = wm || {};
        
        var crtSizes=<%= session.getAttribute("crtSizes")%>
        var operationType = <%=userContext.getMember().getOperationType()%>;
    	var isFromBackend=<%=userContext.isFromBackend()%>
    	var system=<%= session.getAttribute("system")%>
	</script>
	<decorator:head />
</head>
<body id="all" >
	<div class="app ng-scope app-header-fixed"
		 >
		<header id="header"  class="app-header navbar bg-primary" role="menu">
			<div class="navbar-header ng-scope box-shadow-inset dk">
				<button class="pull-right visible-xs">
					<i class="ti-settings"></i>
				</button>
				<button class="pull-right visible-xs">
					<i class="ti-menu"></i>
				</button>
			</div>
			<ul class="nav navbar-nav navbar-right ng-scope">
				<c:if test="${userContext.member.operationType==2}">
					<li class="notice-li hNum notThrough" onclick="javascript:window.location.href='/ci/audit_list?'+new Date().getTime()">
						<i class="news-notice icon glyphicon glyphicon-bell"></i>
						<%--<b class="badge badge-xs bg-success up">999</b>--%>
					</li>
				</c:if>

				<li><a href="javascript:;" id="user-action"
					class="clear no-padding-h ng-scope" 
					data-animation="am-collapse" data-template="user"> 
					<c:choose>
						<c:when test="${member.avatarPath==null}">
							<img src="/images/a.jpg" alt="..." class="navbar-img pull-right" id="imagePath">
						</c:when>
						<c:otherwise>
							<img src="${member.avatarPath}?<%= System.currentTimeMillis()%>" alt="..." class="navbar-img pull-right" id="imagePath">
						</c:otherwise>
					</c:choose>
						<span class="hidden-sm m-l">${member.companyName}</span> 
						<b class="caret m-h-xs hidden-sm user-info-select"></b>
				</a>

					<ul id="mess"
						class="dropdown-menu pull-right no-b-t   bottom-left am-collapse"
						style="top: 48px; left: 0px; display: none; visibility: visible;">
						<li><a href="javascript:window.location.href='/profile?'+new Date().getTime()">账号中心</a></li>
						<li><a href="javascript:window.location.href='/profile/modify_password?'+new Date().getTime()">修改密码</a></li>
						<li class="divider"></li>
						<li><a  href="javascript:;" class="logout-btn">退出</a>
						</li>
					</ul></li>
			</ul>
			<form
				class="navbar-form navbar-form-sm navbar-right visible-xs ng-scope ng-pristine ng-valid"
				role="search">
				<div class="form-group">
					<div class="input-group">
						<span class="input-group-btn">
							<button type="submit"
								class="btn btn-sm no-bg btn-icon no-shadow no-padder">
								<i class="ti-search"></i>
							</button>
						</span> <input type="text" 
							class="form-control input-sm no-bg no-border ng-pristine ng-valid"
							placeholder="Search...">
					</div>
				</div>
			</form>
		</header>
		<aside id="aside" class="app-aside hidden-xs bg-dark lt">
			<div class="navbar nav_title" style="border: 0;">
				<a class="navbar-brand text-lt" href="/dashboard"> 
				<img src="/images/logo.png"> <span class="hidden-folded m-l-xs ng-binding" style="font-weight:bold;">
					海量通<small style="margin-left:8px;">Beta</small>
				</span>
				</a>
            </div>
			<div class="app-aside-inner ng-scope affix-top" 
				style="position: absolute;">
				<div class="app-aside-body scrollable hover ng-scope">
					<nav class="ng-scope">
						<ul id="ter" class="nav pt">
						</ul>
					</nav>
 				</div>
			</div>
		</aside>
        <script type="text/javascript">
            if(operationType==2){
                getInform();
			    setInterval("getInform()",5000);
            }
            function getInform(){
                $.ajax({
                    url:"/common/audit/not_through/reason/count",
                    type: "GET",
                    dataType: "json",
                    cache: false,
                    async: false,
                    success: function(count) {
                        if(0==parseInt(count)){
                            $(".notThrough").find('.badge').remove();
                        }else{
                            if (parseInt(count) >= 1000) {
                                count = '99+';
                            }
                            $(".notThrough").find('.badge').remove();
                            $(".notThrough").append("<b class='badge badge-xs bg-success up'>"+count+"</b>");
                        }
                    }
                });
            }
        </script>
  <div id="content" class="app-content" role="main" >
  	<decorator:body/>
  </div>
  <footer id="footer" class="app-footer" role="footer" >
  	<div class="p bg-white text-xs ng-scope">
	  <div class="pull-right hidden-xs hidden-sm text-muted">
	    <strong class="ng-binding">海量通</strong> © 2016-2017
	  </div>
	</div>
  </footer>
  </div>
	<script type="text/javascript" src="/js/jquery.cookie.js"></script>
	<%@include file="/WEB-INF/jspf/messages.jsp" %>
	<script type="text/javascript">
	<% request.setAttribute("okmessage", null); %>;
	</script>
	<script src="/js/common.js"></script>
	<decorator:getProperty property="page.local_script"></decorator:getProperty>
</body>
</html>
